//
//  TrasitionViewController.swift
//  Animator
//
//  Created by liu guoqiang on 16/9/10.
//  Copyright © 2016年 liu guoqiang. All rights reserved.
//

import UIKit

class TrasitionViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }
    
    @IBAction func FlipFromLeft(sender: AnyObject) {
        UIView.transitionWithView(self.view, duration: 3.0, options:[UIViewAnimationOptions.CurveEaseOut,UIViewAnimationOptions.TransitionFlipFromLeft], animations: {
            print("动画开始")
            }) { (finished) in
                print("动画完成")
        }
    }

    @IBAction func FlipFromRight(sender: AnyObject) {
        UIView.transitionWithView(self.view, duration: 3.0, options: [UIViewAnimationOptions.CurveEaseOut,UIViewAnimationOptions.TransitionFlipFromRight], animations: {
            print("动画开始")
        }) { (finished) in
            print("动画完成")
        }

    }
    
    @IBAction func CurlUP(sender: AnyObject) {
        UIView.transitionWithView(self.view, duration: 3.0, options: [UIViewAnimationOptions.CurveEaseOut,UIViewAnimationOptions.TransitionCurlUp], animations: {
            print("动画开始")
        }) { (finished) in
            print("动画完成")
        }

    }
    
  
    @IBAction func CurlDown(sender: AnyObject) {
        UIView.transitionWithView(self.view, duration: 3.0, options: [UIViewAnimationOptions.CurveEaseOut,UIViewAnimationOptions.TransitionCurlDown], animations: {
            print("动画开始")
        }) { (finished) in
            print("动画完成")
        }

    }
}
